<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
		<meta name="viewport" id="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
		<meta name="format-detection" content="telephone=no" />
		<link rel="stylesheet" href="css/reset.css" type="text/css"/>
		<link href="css/d7-isousuo.css" rel="stylesheet" type="text/css">

		<link rel="stylesheet" type="text/css" href="themess/css/base.css">
		<link rel="stylesheet" type="text/css" href="themess/css/home.css">
		<link rel="stylesheet" type="text/css" href="themess/css/icon.css">

		<link rel="stylesheet" href="css/reset.css" type="text/css"/>
		<link href="css/d7-isousuo.css" rel="stylesheet" type="text/css">
		<link href="iTunesArtwork@2x.png" sizes="114x114" rel="apple-touch-icon-precomposed">
		<title>商品搜索</title>
	</head>
	<body>
		<div class="d7-sousuo-wear">
			
			<div class="d7-sousuo-top">
				<a href="index.html" class="d7-sousuo-t1"></a>
				<span class="d7-sousuo-t2">
					<input type="text" placeholder="搜索商品..." name="" id="search">
				</span>
				<span class="d7-sousuo-t3"></span>
			</div>
		
			<div class="d7-sousuo-mid">
				<span class="d7-sousuo-jl1 hot">火龙果</span>
				<span class="d7-sousuo-jl1 hot">草莓</span>
				<span class="d7-sousuo-jl1 hot">葡萄</span>
			</div>
		</div>
		<script>
			
		</script>
	</body>
</html>
<section class="aui-flexView" style="display: none">
	<header class="aui-navBar">
		<a href="javascript:history.go(-1);" class="aui-navBar-item">
			<i class="aui-icon aui-back-icon"></i>
		</a>
		<div class="aui-navBar-center">
			<span class="aui-navBar-title">商品列表</span>
		</div>
	</header>
	<nav class="aui-flexNav">
		<ul class="aui-search-tab bor-bom">
			<li class="aui-change-eleven active">
				<span>综合</span>
			</li>
			<li class="aui-change-eleven">
				<span>销量</span>
			</li>
			<li class="aui-change-eleven aui-new-sort-price">
				<span>价格</span>
			</li>
			<li class="aui-change-eleven">
				<span>筛选<span class="choose-icon"></span></span>
			</li>
		</ul>

	</nav>

	<div id="wrapper" style="top:96px;">
		<div class="aui-scrollView">
			<article class="aui-scrollView-list">

			</article>
		</div>
	</div>
</section>
<script src="js/jquery-1.8.3.min.js" type="text/javascript"></script>
<script type="text/javascript" src="js/core.util.js"></script>
<script type="text/javascript" src="js/mlayer.min.js"></script>
<script type="text/javascript" src="themess/js/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="themess/js/aui-scroll.js"></script>
<script type="text/javascript" src="js/mlayer.min.js"></script>
<script type="text/javascript" src="js/core.util.js"></script>
<script type="text/javascript">
	$(function(){
		var index = mlayer.loading({
			title: '加载中'
		});

		$(".hot").click(function() {
			$(".aui-flexView").show();
			$(".d7-sousuo-mid").hide();
			product($(this).text())
		});

		$(".d7-sousuo-t3").click(function() {
			$(".aui-flexView").show();
			$(".d7-sousuo-mid").hide();
			var search  = $("#search").val();
			product(search);
		});
		mlayer.close(index);

		function product(search) {
			CoreUtil.sendPost("/api/index/search", {"search":search},function (res) {
				var content = "";
				for(var imvos of res.data.productVoList) {
					content+="<a href='goods-details.html?productId="+imvos.id+"'  class='aui-scrollView-list-item'>";
					content+="<div class='aui-product-list-img'>";
					content+="<img src='"+imvos.imgUrl+"' alt=''>";
					content+="</div>";
					content+="<div class='aui-product-list-text'>";
					content+="<h3 class='aui-product-list-title'>"+imvos.productName+"</h3>";
					content+="<div class='aui-product-list-center'>";
					content+="<div>";
					content+="<span class='aui-product-list-price'><em>¥</em>"+imvos.mallMobilePrice+"</span>";
					content+="</div>";
					content+="<div class='aui-product-evaluate'>100%好评</div>";
					content+="</div>";
					content+="</div>";
					content+="</a>";
				}
				$(".aui-scrollView-list").html(content);
				document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);
				document.addEventListener('DOMContentLoaded', loaded, false);
			});
		}
	});
</script>